package test.db.table.oracle.type;

import test.db.table.Table;

/**
 * @author newbie
 * @since 0.1
 */
public enum PwUserHistoryTable implements Table, ColumnType {
    USER_SID(Column.userSid),
    WRITE_CNT(Column.writeCnt),
    BEST_CNT(Column.bestCnt),
    REPLY_CNT(Column.replyCnt),
    MEMO_CNT(Column.memoCnt),
    MEMO_REPLY_CNT(Column.memoReplyCnt),
    MODIFY_TIMESTAMP(Column.modifyTimestamp);
    
    private final Column column;
    private static final String TYPE_WRITE_CNT = "NUMBER(8)";
    private static final String TYPE_BEST_CNT = "NUMBER(8)";
    private static final String TYPE_REPLY_CNT = "NUMBER(8)";
    private static final String TYPE_MEMO_CNT = "NUMBER(8)";
    private static final String TYPE_MEMO_REPLY_CNT = "NUMBER(8)";

    PwUserHistoryTable(Column column) {
        this.column = column;
    }
    
    private enum Column {
        userSid {
            String getType() {
                return TYPE_USER_SID;
            }
        },
        
        writeCnt {
            String getType() {
                return TYPE_WRITE_CNT;
            }
        },

        bestCnt {
        	String getType() {
        		return TYPE_BEST_CNT;
        	}
        },
        
        replyCnt {
        	String getType() {
        		return TYPE_REPLY_CNT;
        	}
        },
        
        memoCnt {
        	String getType() {
        		return TYPE_MEMO_CNT;
        	}
        },
        
        memoReplyCnt {
        	String getType() {
        		return TYPE_MEMO_REPLY_CNT;
        	}
        },

        modifyTimestamp {
            String getType() {
                return TYPE_MODIFY_TIMESTAMP;
            }
        };
        
        abstract String getType();
    }
    
    public String getType() {
        return column.getType();
    }
    
    public void initData() throws Exception {
    }
}